package com.jy.rhin.infra.cda.dao.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jy.rhin.infra.cda.dao.ZhongXingJSBSFDao;
import com.jy.rhin.infra.cda.mapper.ZhongXingJSBSFMapper;
import com.jy.rhin.infra.cda.zxjsb.JingShenBSFVo;
import com.jy.rhin.infra.cda.zxjsb.JingShenBSFYYVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ZhongXingJSBSFDaoImpl implements ZhongXingJSBSFDao {

    @Resource
    ZhongXingJSBSFMapper zhongXingJSBSFMapper;

    @Override
    public JingShenBSFVo get(String jingShenBSFJLID, String yeWuJGDM) {
        QueryWrapper<JingShenBSFVo> queryWrapper = new QueryWrapper<JingShenBSFVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("JINGSHENBINGSFJLID", jingShenBSFJLID);
        return zhongXingJSBSFMapper.getOne(queryWrapper);
    }

    @Override
    public List<JingShenBSFYYVo> getYongYao(String jingShenBSFJLID, String yeWuJGDM) {
        QueryWrapper<JingShenBSFYYVo> queryWrapper = new QueryWrapper<JingShenBSFYYVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("JINGSHENBINGJLID", jingShenBSFJLID);
        return zhongXingJSBSFMapper.getYongYao(queryWrapper);
    }

}